//
//  DTTextPicker.h
//  Dentist
//
//  Created by Sckjsckj on 3/24/15.
//  Copyright (c) 2015 Sckjsckj. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum{
    
    UUDateStyle_YearMonthDayHourMinute = 0,
    UUDateStyle_YearMonthDay,
    UUDateStyle_MonthDayHourMinute,
    UUDateStyle_HourMinute,
    UUDateStyle_MonthYear
    
}DateStyle;

@protocol XMCommonPickerDelegate;

@interface XMCommonPicker : UIView

@property (nonatomic, strong) NSArray *dataArr;
@property (nonatomic, strong) NSArray *subDataArr;
@property (nonatomic, weak) id<XMCommonPickerDelegate> commonPickerDelegate;

- (instancetype)initWithFrame:(CGRect)frame component:(NSInteger)component;
- (void)setCurrentIndex:(NSInteger)index subIndex:(NSInteger)subIndex;
- (void)show:(UIScrollView *)scrolld;
- (void)hide;
- (void)reloadTextPicker;

@end


@protocol XMCommonPickerDelegate <NSObject>

- (void)picker:(XMCommonPicker *)picker selectedRow:(NSInteger)selectedRow selectedSubRow:(NSInteger)selectedSubRow;

@end